package com.hbnu.dao;

import com.hbnu.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Insert("insert into tb_user(name,addr) values (#{name},#{addr})")
    public abstract void addDataD(User user);

    @Update("update tb_user set name = #{name},addr=#{addr} where id=#{id}")
    public abstract void updateA(User user);
//    @Select("select * from tb_user where name=#{arg0}")
//    @Select("select * from tb_user where name=#{param1}")
    @Select("select * from tb_user where name=#{name}")
    public abstract void selectA(@Param(value = "name") String name);
    @Delete("DELETE FROM tb_user WHERE name = #{name}")
    public abstract void deleteA(String name);

    @Select("select * from tb_user")
    public abstract List<User> findAllA();


}
